<template>

    <button @click="toggleDark">切换</button>
    
</template>
<script setup lang="ts">

import { useDark, useToggle } from '@vueuse/core'

const isDark = useDark()

const toggleDark = useToggle(isDark)

</script>

<style>
    html {
        transition: background-color 1s;
    }
</style>